﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EuroManager.Domain.Simulator.Helpers;
using NUnit.Framework;

namespace EuroManager.Domain.Simulator.Tests.Helpers
{
    [TestFixture]
    public class SingleExtensionsTests
    {
        [Test]
        public void ShouldConsiderSimpleNumberAsRational()
        {
            Assert.IsTrue(SingleExtensions.IsRational(5.13f));
        }

        [Test]
        public void ShouldNotConsiderPositiveInfinityAsRational()
        {
            Assert.IsFalse(SingleExtensions.IsRational(Single.PositiveInfinity));
        }

        [Test]
        public void ShouldNotConsiderNegativeInfinityAsRational()
        {
            Assert.IsFalse(SingleExtensions.IsRational(Single.NegativeInfinity));
        }

        [Test]
        public void ShouldNotConsiderNaNAsRational()
        {
            Assert.IsFalse(SingleExtensions.IsRational(Single.NaN));
        }
    }
}
